package main

import (
	"fmt"
	"github.com/ethereum/go-ethereum/rpc"
)

const url = "http://localhost:8545"

func main() {
	client, _ := rpc.Dial(url)
	version(client)
	webSha3(client)
}

func version(client *rpc.Client) {
	var verison string
	client.Call(&verison, "web3_clientVersion")
	fmt.Println("version", verison)
}

func webSha3(client *rpc.Client) {
	var sha string
	client.Call(&sha, "web3_sha3", "hello,ethereum")
	fmt.Println("sha3", sha)

}
